package action;

import java.util.ArrayList;
import java.util.List;

import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.service.ServiceRegistry;
import org.hibernate.service.ServiceRegistryBuilder;

import db.MyHibernateSessionFactory;
import entity.Contest;
import service.impl.ContestDAOImpl;

public class TestAction extends SuperAction{
	List<Contest> dataContests;

	

	public List<Contest> getDataContests() {
		return dataContests;
	}



	public void setDataContests(List<Contest> dataContests) {
		this.dataContests = dataContests;
	}



	public String execute(){
		ContestDAOImpl contestDAOImpl = new ContestDAOImpl();
		dataContests = contestDAOImpl.queryAllDefault(1, 10);
		
		return SUCCESS;
	}
	
}
